package org.shilong.MContext.Businesscard;

import org.shilong.MInterface.Businesscard.BusinessCardInterface;

public class BusinessCardContext {

	private static BusinessCardInterface BCI = null;

	/*创建名片*/
	public final static String TYPE_CREATE_BUSINESS_CARD = "org.shilong.MImpl.Businesscard.CreateBussinessCardImpl";

	/*更新名片*/
	public final static String TYPE_ALERT_BUSINESS_CARD = "org.shilong.MImpl.Businesscard.AlertBusinessCardImpl";
	
	
	

	/**
	 * 名片实现类实例工具方法
	 * @param type
	 * @return
	 */
	public static BusinessCardInterface createInstance( String type ){

		BCI = null;

		try {
			BCI = (BusinessCardInterface)Class.forName( type ).newInstance();
		} catch (InstantiationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		return BCI;
	}
}
